package com.qf.controller;

import com.qf.pojo.User;
import com.qf.service.UserService;
import javafx.scene.media.VideoTrack;

import java.util.List;

public class UserContorller {
    private UserService userService;

    public void setUserService(UserService userService) {
        this.userService = userService;
    }
    //查询所有
    public List<User> findAll(){
        return userService.findAll();
    }
    //根据id删除
    public void delete(int id){
        userService.deleteById(id);
    }
    //添加用户
    public void addUser(User user){
        userService.addUser(user);
    }
    //修改
    public void updateUser(User user){
        userService.updateUser(user);
    }
}
